﻿Imports System.ComponentModel

Public Class ModulePermissions
    Inherits BaseMasterInfo
    Implements INotifyPropertyChanged

    Dim _View As Boolean = False
    Dim _Add As Boolean = False
    Dim _Edit As Boolean = False
    Dim _Delete As Boolean = False
    Dim _Print As Boolean = False

    Public Property ModuleType As String = String.Empty

    Public Property View As Boolean
        Get
            Return _View
        End Get
        Set(ByVal value As Boolean)
            _View = value
            NotifyPropertyChanged()
        End Set
    End Property

    Public Property Add As Boolean
        Get
            Return _Add
        End Get
        Set(ByVal value As Boolean)
            _Add = value
            NotifyPropertyChanged()
        End Set
    End Property

    Public Property Edit As Boolean
        Get
            Return _Edit
        End Get
        Set(ByVal value As Boolean)
            _Edit = value
            NotifyPropertyChanged()
        End Set
    End Property

    Public Property Delete As Boolean
        Get
            Return _Delete
        End Get
        Set(ByVal value As Boolean)
            _Delete = value
            NotifyPropertyChanged()
        End Set
    End Property

    Public Property Print As Boolean
        Get
            Return _Print
        End Get
        Set(ByVal value As Boolean)
            _Print = value
            NotifyPropertyChanged()
        End Set
    End Property

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Private Sub NotifyPropertyChanged(Optional ByVal propertyName As String = Nothing)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
    End Sub
End Class

